class ClassifyItemEntity {
  String? id;
  String? className;
  String? image;
  String? sid;
  List<ClassifyItemEntity?>? children;

  ClassifyItemEntity(
      {this.id, this.className, this.image, this.sid, this.children});

  ClassifyItemEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    className = json['className'];
    image = json['image'];
    sid = json['sid'];
    if (json['children'] != null) {
      List<ClassifyItemEntity> infoList=(json['list'] as List).map((e){
        return ClassifyItemEntity.fromJson(e);
      }).toList();
      children=infoList;
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = id;
    data['className'] = className;
    data['image'] = image;
    data['sid'] = sid;
    if (children != null) {
      data['children'] = children?.map((v) => v?.toJson()).toList();
    }
    return data;
  }
}



